package com.xiaoxie.cloud.service.impl;

import com.xiaoxie.cloud.mapper.StorageMapper;
import com.xiaoxie.cloud.service.StorageService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Service
@Slf4j
@RequiredArgsConstructor
public class StorageServiceImpl implements StorageService {


    private final StorageMapper storageMapper;
    @Override
    public void decrease(Long productId, Integer count) {
        log.info("------> storage-service中扣减库存开始");
        storageMapper.decrease(productId,count);
        log.info("------> storage-service中扣减库存结束");
    }
}
